package org.nf.web.servlet.view;

import jakarta.servlet.ServletException;
import org.nf.web.servlet.BaseView;
import org.nf.web.servlet.ServletApi;

import java.io.IOException;

/**
 * @author wangl
 * @date 2024/5/21
 * 默认视图
 */
public class DefaultView extends BaseView {

    private final Object object;

    public DefaultView(Object object) {
        this.object = object;
    }

    @Override
    protected void render(ServletApi api) throws ServletException, IOException {
        api.response().getWriter().println(object);
    }
}